from math import ceil, floor, trunc


def use_trunc():
    """
    ignores everything after the decimal point
    """
    print(trunc(12.2))
    print(trunc(12.5))
    print(trunc(12.7))
    """
    Similarly, the int() constructor accepts a float and uses truncation to cast a float to an int
    """
    print(int(12.2))
    print(int(12.5))
    print(int(12.7))


def use_floor():
    """
    向下取整
    """
    print(floor(12.2))
    print(floor(12.5))
    print(floor(12.7))
    print(floor(-12.7))


def use_ceil():
    """
    向上取整
    """
    print(ceil(12.7))
    print(ceil(-12.7))


def main() -> None:
    # use_trunc()
    # use_floor()
    use_ceil()


if __name__ == "__main__":
    main()
